<template>
    <div>
        <div class="box">
            <img :src="srcUrl" alt="">
            <p>这是一只好看的小狗狗</p>
        </div>
    </div>
</template>

<script>
export default {
   data() {
    return {
        srcUrl:'https://img2.baidu.com/it/u=1769187201,2504400867&fm=253&fmt=auto&app=138&f=JPEG?w=456&h=608'
    }
   },
}
</script>

<style scoped>
 .box {
    width: 200px;
    height: 200px;
    border: 1px solid #000;
    float: left;
    text-align: center;
 }
 .box img {
    width: 100%;
    height: 200px;
 }
</style>